<h3>{$title}</h3>
<div class="row">
	<form enctype="multipart/form-data" name="addPost" action="addPost.php?action=Publish" method="POST">
		<div class="col-md-9">
			<div class="bg-white fuf-shadow tbl-td">
				<input type="text" name="jdl_post" class="form-control input-lg" placeholder="Judul Artikel">
			</div>
			<div class="bg-white fuf-shadow tbl-td bts-ats">
				<textarea class="fuf-input form-control" rows="20" name="isi_post" placeholder="Isi Post nti pake html editor belum dipasang" ></textarea>
			</div>
		</div>
		<div class="col-md-3">
			<div class="bg-white fuf-shadow tbl-td">
				<h4><i class="fa fa-paper-plane"></i> Publish</h4><hr/>
				<p><i class="fa fa-thumb-tack txt-silver"></i> Status : <b>Draft</b> <a href="">edit</a></p>
				<p><i class="fa fa-eye txt-silver"></i> Visibility : <b>Public</b> <a href="">edit</a></p>
				<p><i class="fa fa-calendar txt-silver"></i> Publish  <b>immediately</b> <a href="">edit</a></p>
				<hr/>
				<button type="submit" class="btn btn-default kanan" >Publish</button>
				<button type="submit" class="btn btn-default kiri">Draft</button>
				<div class="sambungfloat"></div>
			</div>
			<div class="bg-white fuf-shadow tbl-td bts-ats">
				<h4><i class="fa fa-tag"></i> kategori</h4><hr/>
				<div class="fuf-cb">
					{foreach from=$kategori item=kat}
					<div class="box-select">
						<div class="box-select-btn"><input type="radio" id="{$kat.jdl_kategori}" name="kategori" value="{$kat.id_kategori}"/></div>
						<div class="box-select-ttl"><label for="{$kat.jdl_kategori}">{$kat.jdl_kategori}</label></div>
					</div>
					{/foreach}
					<div class="sambungfloat"></div>
				</div><hr/>
				<input type="text" name="addKategori" class="form-control" placeholder="Buat Kategori Baru">
			</div>
			<div class="bg-white fuf-shadow tbl-td bts-ats">
				<h4><i class="fa fa-tags"></i> Tag</h4><hr/>
				<div class="fuf-cb">
					{foreach from=$tag item=tag}
					<div class="box-select">
						<div class="box-select-btn"><input type="checkbox" id="c{$tag.jdl_tag}" name="tag[]" value="{$tag.id_tag}" /></div>
						<div class="box-select-ttl"><label for="c{$tag.jdl_tag}">{$tag.jdl_tag}</label></div>
					</div>
					{/foreach}
					<div class="sambungfloat"></div>
				</div><hr/>
				<!--<input type="Checkbox" id="c{$tag.jdl_tag}" name="tag" value="{$tag.jdl_tag}">
				<label for="c{$tag.jdl_tag}"></label><br/>-->
				<input type="text" name="addTag" class="form-control" placeholder="Buat Tag Baru">
			</div>
			<div class="bg-white fuf-shadow tbl-td bts-ats">
				<h4><i class="fa fa-image"></i> Post Image</h4><hr/>
				<input type="file" class="filestyle" data-icon="false" name="filedata" id="filedata">
				<img class="img-prev" id="preview" src="#" alt="preview image" /><hr/>
				<p>Image ini akan menjadi Gambar Artikel pada halaman Utama.</p>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
	{literal}
	tinymce.init({
		selector: "textarea",
		plugins: [
		"advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
		"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
		"table contextmenu directionality emoticons template textcolor paste fullpage textcolor jbimages"
		],

		toolbar1: "bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | link unlink pagebreak | jbimages | code",

		menubar: false,
		toolbar_items_size: 'small',

		style_formats: [
		{title: 'Bold text', inline: 'b'},
		{title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
		{title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
		{title: 'Example 1', inline: 'span', classes: 'example1'},
		{title: 'Example 2', inline: 'span', classes: 'example2'},
		{title: 'Table styles'},
		{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
		],

		templates: [
		{title: 'Test template 1', content: 'Test 1'},
		{title: 'Test template 2', content: 'Test 2'}
		],

		relative_urls: false
	});
function readURL(input) {

	if (input.files && input.files[0]) {
		var reader = new FileReader();

		reader.onload = function (e) {
			$('#preview').attr('src', e.target.result);
		}

		reader.readAsDataURL(input.files[0]);
	}
}

$("#filedata").change(function(){
	readURL(this);
});
{/literal}
</script>